package eo.application;

import java.io.IOException;
import java.net.URL;
import java.util.Map;

import eo.application.io.Externalizable;
import eo.builder.exception.ApplicationConfigurationException;
import eo.descriptor.configuration.ApplicationInstance;

/**
 * Configures an instance.
 * 
 * @author takeshi
 * 
 */
public interface ApplicationConfiguration extends Externalizable {
    ApplicationInstance create() throws ApplicationConfigurationException;

    String getURL();

    String getConnectionProperty(String name);

    String getConfigurationProperty(String name);

    Map<String, String> getConnectionProperties();

    Map<String, String> getConfigurationProperties();

    void setClasspathEntries(URL... urls);

    void setUrl(final String url);

    void addConfigurationFile(URL url) throws IOException,
            ApplicationConfigurationException;

    void setProperty(final String property, final String value);

    void setDriverClassName(final String className)
            throws ApplicationConfigurationException;

    String getDriverClassName();
}
